<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../fonts/element-icons.ttf">
    <link rel="stylesheet" href="../fonts/element-icons.woff">
    <link rel="stylesheet" href="../css/ele.css">
    <script src="../js/vue.js"></script>
    <script src="../js/axios.min.js"></script>
    <script src="../js/url.js"></script>
    <!-- <script src="../node_modules/element-ui/lib/index.js"></script> -->
    <script src="../js/ele.js"></script>
    <link rel="stylesheet" href="../css/public.css">
    <link rel="stylesheet" href="../css/znxxxtSearch.css">
    <script src="../js/crypto-js.min.js"></script>
    <script src="../js/aes.js"></script>
    <script src="../js/Mixin.js"></script>
</head>

<body>
    <div id="app">
        <!-- 头部 -->
        <header>
            <div class="heart ng-scope" ng-controller="HeartForm">
                <div class="logo" @click="goHome">
                    <img src="../image/index/logo.png" alt="" style="width: 123px;height: 59px;margin-top: 8px;">
                    <div style="width: 1px;
                height: 24px;
                background: #333333;
                margin-top: 7%;
                margin-right: 9px;"></div>
                    <div>留学大数据，智能选校专家</div>
                </div>
                <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="menuSelect">
                    <el-submenu index="1">
                        <template slot="title">产品</template>
                        <div class="chanpin">
                            <ul class="unav">
                                <li :class="[activenavliIndex==0?'activenavli':'']" @click="unavclcik(0)">全球院校库</li>
                                <li :class="[activenavliIndex==1?'activenavli':'']" @click="unavclcik(1)">智能选校系统</li>
                            </ul>
                            <div style="margin-left: 53px;" v-if="activenavliIndex==0">
                                <div class="ltitle"> <img src="../image/index/quanqiu.png" alt=""
                                        style="width: 26px;vertical-align: bottom;">
                                    全球院校库</div>
                                <div class="lcontent">
                                    <!-- <div> -->
                                    <ul v-for="(item,index) in headerList" :key="index">
                                        <li>{{item.name}}</li>
                                        <li v-for="i in item.universityItems" @click="qqyxkClick(item.id,i.id)">
                                            {{i.name}}院校库
                                        </li>
                                    </ul>
                                </div>
                            </div>
                            <div style="margin-left: 53px;" v-if="activenavliIndex==1">
                                <div class="ltitle"> <img src="../image/index/quanqiu.png" alt=""
                                        style="width: 26px;vertical-align: bottom;">
                                    智能选校系统</div>
                                <div class="lcontent">
                                    <div>
                                        <ul>
                                            <li v-for="(i,index) in znxxxtList" :key="index" style="font-size: 12px;"
                                                @click="znxxxtSearch(i)">
                                                {{i.name}}</li>

                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </el-submenu>
                    <el-menu-item index="2">会员</el-menu-item>
                    <el-menu-item index="3">套餐</a></el-menu-item>
                    <el-menu-item index="4">合作</a></el-menu-item>

                </el-menu>
                <div class="user_box" id="user_box">
                    <div v-if="isLogin">
                        <el-dropdown trigger="click">
                            <span class="el-dropdown-link">
                                <img :src="HeadImageUrl" alt=""
                                    style="width: 33px;height: 33px; vertical-align: middle;margin-right: 8px;">
                                {{nickname}}<i class="el-icon-arrow-down el-icon--right"></i>
                            </span>
                            <el-dropdown-menu slot="dropdown">
                                <el-dropdown-item icon="el-icon-user" @click.native="goUser">个人中心</el-dropdown-item>
                                <el-dropdown-item icon="el-icon-layout"
                                    @click.native="layoutLogin">退出登录</el-dropdown-item>
                            </el-dropdown-menu>
                        </el-dropdown>
                    </div>
                    <div v-else @click="login"><img src="../image/index/user.png" alt=""
                            style="width: 22px;vertical-align: middle;"> <a href="./login.html">登录</a>/ <a
                            href="./register.html">注册</a> </div>
                </div>
            </div>
        </header>
        <div class="zixun">
            <div @click="()=>dialogWxzxVisiable=true">
                <img src="../image/qqyxk/weixin.png" alt="">
                <p>微信咨询</p>
            </div>
            <div @click="()=>dialogGxsjVisiable=true">
                <img src="../image/qqyxk/shujuyuan.png" alt="">
                <p>数据源更新</p>
            </div>
            <div style="border: 0;" @click="goTop">
                <img src="../image/qqyxk/goTop.png" alt="">
                <p>返回顶部</p>
            </div>
        </div>
        <div class="tcontent">
            <div class="ttitle">
                <div class="zt">智能选校系统</div>
                <!-- <span>{{yuxiaoku.name}}</span> -->
                <el-select v-model="countrySelectSystem" placeholder="请选择" style="margin-left: 18px;"
                    @change="countrySelectSystemChange">
                    <el-option v-for="item in znxxxtList" :key="item.id" :label="item.name" :value="item.id">
                    </el-option>
                </el-select>
            </div>
            <div class="yxc">
                <div class="yxcontent">
                    <div>
                        <div class="title">
                            <img src="../image/znxxxt/yxbj.png" alt="">
                            院校背景
                        </div>
                        <div class="selectdiv">
                            <span class="text">本科院校：</span>
                            <el-select v-model="form.zncollegeId" filterable placeholder="输入如：清华大学" clearable>
                                <el-option v-for="item in zncollegeOptions" :key="item.id" :label="item.name"
                                    :value="item.id">
                                </el-option>
                            </el-select>
                        </div>
                        <div class="selectdiv">
                            <span class="text">就读专业：</span>
                            <el-select v-model="form.basubjectid" filterable placeholder="输入如：金融" clearable>
                                <el-option v-for="item in basubjectOptions" :key="item.id" :label="item.name"
                                    :value="item.id">
                                </el-option>
                            </el-select>
                        </div>
                        <div class="selectdiv">
                            <span class="text">本科成绩：</span>
                            <el-input type="number" max="100" min="0" oninput="if(value){value=value.replace(/[^\d]/g,1);
                                if(Number(value)<=0){value=0}} if(Number(value)>100){value=100}" placeholder="输入成绩如：95"
                                v-model="form.avgscore"></el-input>
                        </div>
                    </div>
                    <div>
                        <div class="title">
                            <img src="../image/znxxxt/chengji.png" alt="">
                            成绩&实习
                        </div>
                        <div class="selectdiv">
                            <span class="text">雅思：</span>
                            <el-select v-model="form.ietlscore" placeholder="选择雅思" clearable>
                                <el-option v-for="item in ietlscoreOptions" :key="item.id" :label="item.name"
                                    :value="item.id">
                                </el-option>
                            </el-select>
                        </div>
                        <div class="selectdiv">
                            <span class="text">GRE/GMAT：</span>
                            <el-select v-model="form.grescore" placeholder="选择：GRE/GMAT" clearable>
                                <el-option v-for="item in grescoreOptions" :key="item.id" :label="item.name"
                                    :value="item.id">
                                </el-option>
                            </el-select>
                        </div>
                        <div class="selectdiv">
                            <span class="text">工作经验：</span>
                            <el-select v-model="form.workexper" placeholder="已毕业选择此项" :disabled="form.project!=''"
                                clearable>
                                <el-option v-for="item in workexperOptions" :key="item.id" :label="item.name"
                                    :value="item.id">
                                </el-option>
                            </el-select>
                        </div>
                        <div class="selectdiv">
                            <span class="text">项目和实习：</span>
                            <el-select v-model="form.project" placeholder="应届生选此项" :disabled="form.workexper!=''"
                                clearable>
                                <el-option v-for="item in projectOptions" :key="item.id" :label="item.name"
                                    :value="item.id">
                                </el-option>
                            </el-select>
                        </div>
                    </div>
                    <div>
                        <div class="title">
                            <img src="../image/znxxxt/yxyx.png" alt="">
                            意向院校
                        </div>
                        <div class="selectdiv">
                            <span class="text">意向院校：</span>
                            <el-select v-model="form.escollegeid" :placeholder="'输入如: ' + escollegeOptions[0].name"
                                filterable clearable>
                                <el-option v-for="item in escollegeOptions" :key="item.id" :label="item.name"
                                    :value="item.id">
                                </el-option>
                            </el-select>
                        </div>
                        <div class="selectdiv">
                            <span class="text">意向领域：</span>
                            <el-select v-model="form.masubjectid" placeholder="输入如：金融" filterable clearable>
                                <el-option v-for="item in masubjectOptions" :key="item.id" :label="item.name"
                                    :value="item.id">
                                </el-option>
                            </el-select>
                        </div>
                        <div class="cxts">
                            <p>查询提示</p>
                            <div>1.意向院校/意向领城任选或全选，输出可申请学校和专业</br> 2.意向院校和意向领城不填，默认只显示可申请的学校(无专业)</div>
                        </div>
                    </div>
                </div>
                <el-button icon="el-icon-search" type="primary" style="margin-top: 33px;width: 190px;margin-left: 50%;
                transform: translateX(-50%);" @click="search">立即查询</el-button>
            </div>
        </div>
        <div class="dialog" v-if="dialogWxzxVisiable">
            <div class="dcontent">
                <img src="../image/close.png" alt="" style="width: 20px;position: absolute;top: 20px;right: 20px;"
                    @click="()=>dialogWxzxVisiable=false">
                <div class="dtop">
                    <img src="../image/wxzx.png" alt="" style="height: 80%;">
                </div>
                <div class="dbtm"></div>
                <div class="cont">
                    <img src="../image/member/ewm.png" alt="" style="width: 142px;margin-top: 33px;">
                    <div style="font-size: 13px;margin-top: 8px;">大李-非攻留学选校系统</div>
                    <div
                        style="font-size: 13px;line-height: 35px;text-align: center;
                        color: #0094FF;width: 287px; height: 35px;background: rgba(0,148,255,0.1);border-radius: 5px 5px 5px 5px;margin:33px auto 0;">
                        扫码添加专属客服微信号，领取专属福利~</div>
                </div>
            </div>
        </div>
        <div class="dialogSjy" v-if="dialogGxsjVisiable">
            <div class="dcontent" style="width: 483px;height: 397px;">
                <img src="../image/close1.png" alt="" style="width: 20px;position: absolute;top: 20px;right: 20px;"
                    @click="()=>dialogGxsjVisiable=false">
                <img src="../image/sjy.png" alt="" style="width: 108px;position: absolute; top:52px;right: 8px;">
                <div style="font-size: 20px;">数据源更新日志</div>
                <div style="font-size: 12px;width: 82%;
                color: #999999;margin-top: 14px;">如果您在使用过程中发现院校数据不正确，可随时提交相关的正确数据，我们将万分感谢您的反馈与支持。
                    我们致力于提供最准确和最新的教育信息，因此您的每一条建议都是我们改进服务的宝贵资源。</div>
                <table cellspacing="0">
                    <thead style="background-color: #0D6EED;">
                        <tr>
                            <th>序号</th>
                            <th>更新时间</th>
                            <th>更新内容</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="i in 6">
                            <td>0{{i}}</td>
                            <td>2025年1月21日</td>
                            <td>更新英国数据库v1.1</td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</body>
<script>
    var app = new Vue({
        mixins: [myMixin],
        el: "#app",
        data() {
            return {
                dialogWxzxVisiable: false,
                dialogGxsjVisiable: false,
                isLogin: false,
                zncollegeOptions: [],
                basubjectOptions: [],
                ietlscoreOptions: [],
                grescoreOptions: [],
                workexperOptions: [],
                projectOptions: [],
                escollegeOptions: [],
                masubjectOptions: [],
                form: {
                    zncollegeId: '',   //本科院校id
                    basubjectid: '',   //本科专业id
                    avgscore: '',       //本科均分（0~100之间）
                    ietlscore: '',      // 雅思成绩id
                    grescore: '',       // GRE成绩id
                    workexper: '',      // 工作经验id
                    project: '',        // 项目和实习id  非必填
                    escollegeid: '',    // 意向院校id    非必填
                    masubjectid: '',    // 意向专业id    非必填
                    // "zncollegeId": "RK0111",
                    // "basubjectid": "B120203K",
                    // "avgscore": "90",
                    // "ietlscore": "9",
                    // "grescore": "337",
                    // "workexper": "10",
                    // "project": '',
                    // "escollegeid": "",
                    // "masubjectid": "",
                    // querycode: 'Z02S001',
                },
                formState: {

                },
                yuxiaoku: {},
                countrySelectSystem: ""
            }
        },
        created() {
            console.log(11111111, JSON.parse(localStorage.znxxxtSearch));

            this.yuxiaoku = JSON.parse(localStorage.znxxxtSearch)

            this.form.querycode = this.yuxiaoku.id
            this.countrySelectSystem = this.yuxiaoku.id
            this.getList()

        },
        methods: {
            getList() {
                http('basicdata/bauniselpara', 'post').then(res => {
                    console.log('本科院校', JSON.parse(Decrypt(res.data)));
                    let data = JSON.parse(Decrypt(res.data))
                    this.zncollegeOptions = data
                })
                http('basicdata/bamajselpara', 'post').then(res => {
                    console.log('本科专业', JSON.parse(Decrypt(res.data)));
                    let data = JSON.parse(Decrypt(res.data))
                    this.basubjectOptions = data
                })
                http('basicdata/ieltsselpara', 'post').then(res => {
                    console.log('雅思：', JSON.parse(Decrypt(res.data)));
                    let data = JSON.parse(Decrypt(res.data))
                    this.ietlscoreOptions = data
                })
                http('basicdata/greselpara', 'post').then(res => {
                    console.log('GRE/GMAT：', JSON.parse(Decrypt(res.data)));
                    let data = JSON.parse(Decrypt(res.data))
                    this.grescoreOptions = data
                })
                http('basicdata/weselpara', 'post').then(res => {
                    console.log('工作经验：', JSON.parse(Decrypt(res.data)));
                    let data = JSON.parse(Decrypt(res.data))
                    this.workexperOptions = data
                })
                http('basicdata/peselpara', 'post').then(res => {
                    console.log('项目和实习：', JSON.parse(Decrypt(res.data)));
                    let data = JSON.parse(Decrypt(res.data))
                    this.projectOptions = data
                })
                http('basicdata/mauniselpara?querycode=' + this.form.querycode, 'post').then(res => {
                    console.log('意向院校：', JSON.parse(Decrypt(res.data)));
                    let data = JSON.parse(Decrypt(res.data))
                    this.escollegeOptions = data
                    if (this.escollegeOptions.length == 0) {
                        location.href = './znxxxtError.html'
                        return
                    }
                })
                http('basicdata/mamajselpara', 'post').then(res => {
                    console.log('意向领域：', JSON.parse(Decrypt(res.data)));
                    let data = JSON.parse(Decrypt(res.data))
                    this.masubjectOptions = data
                })
            },
            countrySelectSystemChange(e) {
                this.form.querycode = e
                let item = this.znxxxtList.find(i => {
                    return i.id == e
                })
                localStorage.znxxxtSearch = JSON.stringify(item)
                this.getList()
            },
            search() {
                if (!this.form.zncollegeId) {
                    return this.$message.warning('请选择本科院校！')
                }
                if (!this.form.basubjectid) {
                    return this.$message.warning('请选择就读专业！')
                }
                if (!this.form.avgscore) {
                    return this.$message.warning('请填写本科成绩！')
                }
                if (!this.form.ietlscore) {
                    return this.$message.warning('请选择雅思！')
                }
                if (!this.form.grescore) {
                    return this.$message.warning('请选择GRE/GMAT!')
                }
                if (!this.form.workexper && !this.form.project) {
                    return this.$message.warning('请选择工作经验或项目实习！')
                }
                http('univ/queryindexcode?querycode=' + this.form.querycode, 'post', this.form).then(res => {
                    if (res.status == 0) {
                        console.log(11111111, Decrypt(res.data));
                        let data = Decrypt(res.data)
                        localStorage.queryonylcode = res.data


                        for (let i of this.zncollegeOptions) {
                            if (i.id == this.form.zncollegeId) {
                                this.formState.zncollege = i.name
                            }
                        }
                        for (let i of this.basubjectOptions) {
                            if (i.id == this.form.basubjectid) {
                                this.formState.basubject = i.name
                            }
                        }
                        this.formState.avgscore = this.form.avgscore

                        for (let i of this.ietlscoreOptions) {
                            if (i.id == this.form.ietlscore) {
                                this.formState.ietlscore = i.name
                            }
                        }
                        for (let i of this.projectOptions) {
                            if (i.id == this.form.project) {
                                this.formState.project = i.name
                            }
                        }
                        for (let i of this.workexperOptions) {
                            if (i.id == this.form.workexper) {
                                this.formState.workexper = i.name
                            }
                        }
                        for (let i of this.grescoreOptions) {
                            if (i.id == this.form.grescore) {
                                this.formState.grescore = i.name
                            }
                        }
                        for (let i of this.escollegeOptions) {
                            if (i.id == this.form.escollegeid) {
                                this.formState.escollege = i.name
                            }
                        }
                        for (let i of this.masubjectOptions) {
                            if (i.id == this.form.masubjectid) {
                                this.formState.masubjectid = i.name
                            }
                        }
                        localStorage.formState = JSON.stringify(this.formState)
                        if (!this.form.escollegeid && !this.form.masubjectid) {
                            window.location.href = './znxxxtSimple.html'
                        } else {
                            window.location.href = './znxxxt.html'
                        }
                    }
                })

            },
            goTop() {
                window.scrollTo({
                    top: 0,
                    behavior: 'smooth'
                });
            }
        }
    })
</script>

</html>